|
In mathematics, bicubic interpolation is an extension of cubic interpolation for interpolating data points on a two dimensional regular grid. The interpolated surface is smoother than corresponding surfaces obtained by bilinear interpolation or nearest-neighbor interpolation. Bicubic interpolation can be accomplished using either Lagrange polynomials, cubic splines, or cubic convolution algorithm. In image processing, bicubic interpolation is often chosen over bilinear interpolation or nearest neighbor in image resampling, when speed is not an issue. In contrast to bilinear interpolation, which only takes 4 pixels (2×2) into account, bicubic interpolation considers 16 pixels (4×4). Images resampled with bicubic interpolation are smoother and have fewer interpolation artifacts. Suppose the function values and the derivatives , and are known at the four corners , , , and of the unit square. The interpolated surface can then be written : The interpolation problem consists of determining the 16 coefficients . Matching with the function values yields four equations, # # # # Likewise, eight equations for the derivatives in the -direction and the -direction # # # # # # # # And four equations for the cross derivative . # # # # where the expressions above have used the following identities, : : :. This procedure yields a surface on the unit square which is continuous and with continuous derivatives. Bicubic interpolation on an arbitrarily sized regular grid can then be accomplished by patching together such bicubic surfaces, ensuring that the derivatives match on the boundaries. Grouping the unknown parameters in a vector, : and letting :, the above system of equations can be reformulated into a matrix for the linear equation . Inverting the matrix gives the more useful linear equation which allows to be calculated quickly and easily, where: :. ==Finding derivatives from function values== If the derivatives are unknown, they are typically approximated from the function values at points neighbouring the corners of the unit square, e.g. using finite differences. To find either of the single derivatives, or , using that method, find the slope between the two surrounding points in the appropriate axis. For example, to calculate for one of the points, find for the points to the left and right of the target point and calculate their slope, and similarly for . To find the cross derivative, , take the derivative in both axes, one at a time. For example, one can first use the procedure to find the derivatives of the points above and below the target point, then use the procedure on those values (rather than, as usual, the values of for those points) to obtain the value of for the target point. (Or one can do it in the opposite direction, first calculating and then off of those. The two give equivalent results.) At the edges of the dataset, when one is missing some of the surrounding points, the missing points can be approximated by a number of methods. A simple and common method is to assume that the slope from the existing point to the target point continues without further change, and using this to calculate a hypothetical value for the missing point. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Bicubic interpolation」の詳細全文を読む スポンサード リンク
|